<script setup lang='ts'>
import PreSale from './PreSale2.vue'
import AfterSale from './AfterSale.vue'
import Audit from './Audit2.vue'
import Audit3 from './Audit3.vue'
import Delivery from './Delivery1.vue'
import InSale from './InSale1.vue'
import TestTransformed from '@/views/process/steps/TestTransformed.vue'

const flags = ref([])
const zzVisible = ref(false)
</script>

<template>
  <a-collapse :default-active-key="['1']" destroy-on-hide w-full>
    <a-collapse-item key="1" header="销售">
      <InSale />
    </a-collapse-item>
    <a-collapse-item key="1.1" header="售前">
      <PreSale />
    </a-collapse-item>

    <a-collapse-item key="1.2" header="内审">
      <Audit />
    </a-collapse-item>
    <a-collapse-item key="2" header="交付">
      <Delivery />
    </a-collapse-item>
    <a-collapse-item key="3" header="测试跟进">
      <el-button type="success" @click="zzVisible = true">
        测试转正
      </el-button>
      <el-button type="primary">
        测试延期
      </el-button>
      <el-button type="danger">
        测试终止
      </el-button>
    </a-collapse-item>
    <a-collapse-item key="4" header="测试转正">
      <a-collapse :default-active-key="['1']" destroy-on-hide w-full>
        <Audit3 />
      </a-collapse>
    </a-collapse-item>
    <a-collapse-item key="5" header="测试终止">
      <el-checkbox-group v-model="flags">
        <el-checkbox label="客户侧业务拆除完成" />
        <el-checkbox label="外采退订完成" />
        <el-checkbox label="平台侧业务关闭完成" />
      </el-checkbox-group>
      <el-button type="primary" :disabled="flags.length !== 3" mt3>
        提交
      </el-button>
    </a-collapse-item>
    <a-collapse-item key="6" header="商务确认(测试终止后)">
      <!-- <div flex>
        <span>备注：</span>
      </div> -->
      <el-form class="!w-1/2">
        <el-form-item label="备注">
          <el-input type="textarea" placeholder="合同专员填写" />
        </el-form-item>
        <div flex-end-center>
          <el-button type="primary" :disabled="flags.length !== 3">
            提交
          </el-button>
        </div>
      </el-form>
    </a-collapse-item>
  </a-collapse>
  <TestTransformed v-model="zzVisible" />
</template>

<style scoped lang='scss'>

</style>
